package com.wzq.design.business.base.product.dto;

import com.wzq.design.business.base.product.entity.BaseProduct;
import com.wzq.ssm.parent.util.EntityUtil;
import lombok.Data;

/**
 * @author wangzhiqiang
 * @since 2023/6/28 16:00
 */
@Data
public class BaseProductDto {

    private String id;

    /**
     * 项目编号
     */
    private String code;

    /**
     * 项目名称
     */
    private String name;

    private String specifications;




    public static BaseProductDto fromDb(BaseProduct sysProduct) {
        return EntityUtil.castDtoToModel(sysProduct, BaseProductDto.class);
    }

    public static BaseProduct toDb(BaseProductDto sysProductDto) {
        return EntityUtil.castDtoToModel(sysProductDto, BaseProduct.class);
    }
}
